home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d26 / drill.arc / MULT.BAS < prev    next >
Encoding:
BASIC Source File  |  1987-05-19  |  1.7 KB  |  39 lines

  1. 100 REM * MULT.BAS * MULTIPLICATION PROGRAM USED WITH DRILL.BAS *
  2. 110 CLS:'Use your own clear screen command here.
  3. 120 REM * Seed the random number generator from Time$
  4. 130 A=VAL(MID$(TIME$,4,2)+MID$(TIME$,7,2)):RANDOMIZE A
  5. 140 PRINT TAB(10)" ----- Multiplication Problems -----"
  6. 150 PRINT
  7. 160 PRINT"You will be given 20 multiplication problems with a limited"
  8. 170 PRINT"time to answer each problem. If you miss no more than"
  9. 180 PRINT"one problem, the problems will get harder. If you miss"
  10. 190 PRINT"more than five, they get easier.
  11. 200 PRINT"You cannot correct errors, so be careful."
  12. 210 PRINT:INPUT"What is the largest multiplier to be used";LA
  13. 220 IF LA<3 THEN LA=3
  14. 230 CLS:PRINT"Largest multiplier is";LA
  15. 240 FOR X=1 TO 20
  16. 250   A=INT(RND*(LA-1)+1)
  17. 260   B=INT(RND*(LA-2)+2)
  18. 270   PRINT A;" x ";B;" = ";
  19. 280   IF A*B<100 AND A*B>9 THEN 320
  20. 290   IF A*B<10 THEN 340
  21. 300   FOR V=1 TO 4000:H$=INKEY$:IF H$="" THEN NEXT V
  22. 310   IF H$="" THEN 350
  23. 320   FOR Y=1 TO 3000:T$=INKEY$:IF T$="" THEN NEXT Y
  24. 330   IF T$="" THEN 350 ELSE 340
  25. 340   FOR Z=1 TO 2000:U$=INKEY$:IF U$="" THEN NEXT Z ELSE 350
  26. 350   PRINT H$+T$+U$;" ";
  27. 360   IF VAL(H$)*100+VAL(T$)*10+VAL(U$)=A*B THEN SC=SC+1 ELSE PRINT;" the correct answer is";A*B;:FOR Y=1 TO 4000:NEXT Y:V$=INKEY$:W$=INKEY$:Z$=INKEY$
  28. 370   PRINT
  29. 380   H$="":T$="":U$=""
  30. 390 NEXT X
  31. 400 PRINT
  32. 410 CT=CT+1:TL=TL+SC
  33. 420 PRINT"Score on last 20 problems is";SC*5;"%":PRINT"Score on all problems is";INT((TL*5/CT)+.5);"%"
  34. 430 IF SC>18 THEN LA=LA+1
  35. 440 IF SC<15 THEN LA=LA-1
  36. 450 SC=0:PRINT"Would you like another set of 20 (Y/N)?"
  37. 460 CU$=INKEY$:IF CU$="" THEN 460
  38. 470 IF CU$="Y" OR CU$="y" THEN 230 ELSE IF CU$="N" OR CU$="n" THEN RUN"DRILL.BAS" ELSE 460
  39.